<?php
	function set_hide($hide, $id, $who){
		global $treeclass, $smarty;
		$treeclass->treehide($id, $hide);
		$dat = $treeclass->get_item_info($id);
		$smarty->assign("el", $dat);
		if ($who == "child"){
			$str = $smarty->fetch('admin/body/childlist/item.html');
		} elseif ($who == "elem"){
			$tmp = $treeclass->_get_page_elements_with_content($dat['parent']);
			if ($dat['type'] == 'images01'){
				$dat = $tmp[$id];
				$smarty->assign("el", $dat);
				$str = $smarty->fetch('admin/body/elements/image.htm');
			} elseif ($dat['type'] == 'news') {
				$dat = $tmp[$id];
				$smarty->assign("el", $dat);
				$str = $smarty->fetch('admin/body/elements/news_item.htm');
			} else {
				$str = $smarty->fetch('admin/body/elements/item.htm');
			}
		}
			
		$objResponse = new xajaxResponse();
		$objResponse->addAssign("childs_id_".$id, "innerHTML", $str);
		return $objResponse;
	}
?>